package com.gll.controller;

import com.gll.pojo.User;
import com.gll.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    private LoginService loginService;

    @RequestMapping("/login")
    public void login(String account,String password){
        System.out.println("账号："+account);
        System.out.println("密码："+password);
        User user = loginService.login(account,password);
        System.out.println(user);
    }

    @Autowired
    public void setLoginService(LoginService loginService) {
        this.loginService = loginService;
    }
}
